package com.supcon.exchangedata.repository.slave6;


import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjGarbageCleanAll;
import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjSewageClean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *   环境污水处理信息
 * @Author: yangbin
 * @Date: 2022/04/20/9:00
 * @Description:
 */
public interface SlaveHjOperationInfo7 extends JpaRepository<HjSewageClean, Long> {


    @Transactional
    @Query(nativeQuery = true, value = "SELECT * FROM hj_sewage_clean WHERE day = (SELECT MAX(day) FROM hj_sewage_clean)")
    List<HjSewageClean> findTopData();

    List<HjSewageClean> findAllByDayBetween(String startTime, String endTime);


}
